package com.bigscreen.pojo;

import lombok.Data;

@Data
public class ShopRank implements Comparable<ShopRank> {
    private Long shopId;
    private String shopName;
    private Double shopAmt;
    private Boolean asc;

    @Override
    public int compareTo(ShopRank shopRank) {
        if (asc){
            return this.shopAmt.compareTo(shopRank.getShopAmt());
        }else{
            return shopRank.getShopAmt().compareTo(this.shopAmt);
        }
    }
}
